|
|
 |
|
|
|
|
' Skip space for the word. Printer.CurrentX = Printer.CurrentX + _
Printer.TextWidth(next_word & " ")
End If
Else ' Skip space for the word. Printer.CurrentX = Printer.CurrentX + _
Printer.TextWidth(next_word & " ")
End If
Loop
' Finish the paragraph by ending the line. Printer.Print
Loop
' See if we got to the desired page yet. If current_page < target_page Then
MsgBox "This page does not exist."
End If
End Sub |
|
|
|
|
|
|
|
|
Example program PrvPages, shown in Figure 5.4, uses this code to produce previews of pages in a multipage document. Enter the number of the page you want to see and click the Preview button to see a print preview. The preview form uses techniques described in Chapter 1, Visual Basics, to display the preview in a scrolled window. Enter a page number and click the Print button to print the page. |
|
|
|
|
|
|
|
|
Figure 5.4
Example program PrvPages displays print previews of pages in a long document. |
|
|
|
|
|